package com.ls.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ls.entity.RuleTemplate;
import com.ls.mapper.RuleTemplateMapper;
import com.ls.service.IRuleTemplateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 规则模板关联表 服务实现类
 * </p>
 *
 * @author pengyu
 * @since 2024-06-28
 */
@Service
public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, RuleTemplate> implements IRuleTemplateService {

    @Override
    public RuleTemplate getOnly(Long ruleId, Long templateId) {
        return getOne(new LambdaUpdateWrapper<RuleTemplate>().eq(RuleTemplate::getRuleId ,ruleId).eq(RuleTemplate::getTemplateId ,templateId));
    }
}
